package com.xidian.zhiancloud.service.user.usermanage;


import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xidian.zhiancloud.dao.syset.usermanage.EnterFoundMapper;
import com.xidian.zhiancloud.model.syset.EnterFoundList;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import javax.servlet.http.HttpServletRequest;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 系统设置-企业基础信息设置
 */

@Service
public class EnterFoundService extends ServiceImpl<EnterFoundMapper, EnterFoundList> {

    @Autowired
    EnterFoundMapper enterFoundMapper;

    @Autowired
    HttpServletRequest request;

    public List<EnterFoundList> getEnterFoundList(Long companyid){
        return enterFoundMapper.getEnterFoundList(companyid);
    }

    /**
     * 企业认证信息
     * @param enterprisename 企业名称
     * @param referred 企业简称
     * @param industry 所属行业分类
     * @param position 企业地址
     * @param positiondetail 企业详细地址
     * @param longitude 经度
     * @param latitude 纬度
     * @return
     */
    public void addEFAuthenticationInformation(
            Long companyid,
            String enterprisename,
            String referred,
            String industry,
            String position,
            String positiondetail,
            BigDecimal longitude,
            BigDecimal latitude){
        enterFoundMapper.addEFAuthenticationInformation(
                companyid,
                enterprisename,
                referred,
                industry,
                position,
                positiondetail,
                longitude,
                latitude);
    }

    public void updateEFCertificateManagement(
            String id,String certificatename,
            String certificationauthority,
            Date validity,Date reviewreminderdate,
            String certificatephoto){
        enterFoundMapper.updateEFCertificateManagement(
                id,certificatename, certificationauthority,
                validity,reviewreminderdate,certificatephoto);
    }

    public int updateBasicEnterpriseInformation
           (String id,EnterFoundList enterfound){
        return enterFoundMapper.updateBasicEnterpriseInformation(id,enterfound);
    }



}
